package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysWeeklyZcmplanMapper;
import com.ruoyi.system.domain.SysWeeklyZcmplan;
import com.ruoyi.system.service.ISysWeeklyZcmplanService;

/**
 * SysWeeklyZcmplanService业务层处理
 * 
 * @author SYF
 * @date 2025-06-17
 */
@Service
public class SysWeeklyZcmplanServiceImpl implements ISysWeeklyZcmplanService {

    @Autowired
    private SysWeeklyZcmplanMapper sysWeeklyZcmplanMapper;

    /**
     * 查询SysWeeklyZcmplan
     * 
     * @param wkYear SysWeeklyZcmplan主键
     * @return SysWeeklyZcmplan
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public SysWeeklyZcmplan selectSysWeeklyZcmplanByWkYear(String wkYear) {
        return sysWeeklyZcmplanMapper.selectSysWeeklyZcmplanByWkYear(wkYear);
    }

    /**
     * 查询SysWeeklyZcmplan列表
     * 
     * @param sysWeeklyZcmplan SysWeeklyZcmplan
     * @return SysWeeklyZcmplan
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<SysWeeklyZcmplan> selectSysWeeklyZcmplanList(SysWeeklyZcmplan sysWeeklyZcmplan) {
        return sysWeeklyZcmplanMapper.selectSysWeeklyZcmplanList(sysWeeklyZcmplan);
    }

    /**
     * 新增SysWeeklyZcmplan
     * 
     * @param sysWeeklyZcmplan SysWeeklyZcmplan
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public int insertSysWeeklyZcmplan(SysWeeklyZcmplan sysWeeklyZcmplan) {
        return sysWeeklyZcmplanMapper.insertSysWeeklyZcmplan(sysWeeklyZcmplan);
    }

    /**
     * 修改SysWeeklyZcmplan
     * 
     * @param sysWeeklyZcmplan SysWeeklyZcmplan
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public int updateSysWeeklyZcmplan(SysWeeklyZcmplan sysWeeklyZcmplan) {
        return sysWeeklyZcmplanMapper.updateSysWeeklyZcmplan(sysWeeklyZcmplan);
    }

    /**
     * 批量删除SysWeeklyZcmplan
     * 
     * @param wkYears 需要删除的SysWeeklyZcmplan主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public int deleteSysWeeklyZcmplanByWkYears(String[] wkYears) {
        return sysWeeklyZcmplanMapper.deleteSysWeeklyZcmplanByWkYears(wkYears);
    }

    /**
     * 删除SysWeeklyZcmplan信息
     * 
     * @param wkYear SysWeeklyZcmplan主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public int deleteSysWeeklyZcmplanByWkYear(String wkYear) {
        return sysWeeklyZcmplanMapper.deleteSysWeeklyZcmplanByWkYear(wkYear);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,String>> selectWeeks(String wkYear){
        return sysWeeklyZcmplanMapper.selectWeeks(wkYear);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,String>> selectYears(){
        return sysWeeklyZcmplanMapper.selectYears();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectYmdList(String wkYear,String wk,String bigname){
        return sysWeeklyZcmplanMapper.selectYmdList(wkYear,wk,bigname);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectQlSummary(String wkYear,String wk){
        return sysWeeklyZcmplanMapper.selectQlSummary(wkYear,wk);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectQtSummary(String wkYear,String wk){
        return sysWeeklyZcmplanMapper.selectQtSummary(wkYear,wk);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectChSummary(String wkYear,String wk){
        return sysWeeklyZcmplanMapper.selectChSummary(wkYear,wk);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> getChList(String sql){
        return sysWeeklyZcmplanMapper.getChList(sql);
    }

    @Override
    @DataSource(DataSourceType.SLAVETMP)
    public List<Map<String,Object>> listProductBase(String sql){
        return sysWeeklyZcmplanMapper.listProductBase(sql);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectCaohuaSummary(String sql){
        return sysWeeklyZcmplanMapper.selectCaohuaSummary(sql);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDWPROD)
    public List<Map<String,Object>> selectCaohuaTotalSummary(String sql){
        return sysWeeklyZcmplanMapper.selectCaohuaTotalSummary(sql);
    }
}
